immediateZoomToBlock

abstract fun immediateZoomToBlock(block: DesignBlock, paddingLeft: Float = 0.0f, paddingTop: Float = 0.0f, paddingRight: Float = 0.0f, paddingBottom: Float = 0.0f, forceUpdate: Boolean = false)

Sets the zoom and focus to show a block. This only shows an effect if the zoom level is not handled/overwritten by the UI. Without padding, this results in a tight view on the block. It is set immediately and assumes that the block dimensions are known. The block should not be in pending state and it's layout should be up to date.

Parameters

block

the block that should be focused on.

paddingLeft

optional padding in screen pixels to the left of the block.

paddingTop

optional padding in screen pixels to the top of the block.

paddingRight

optional padding in screen pixels to the right of the block.

paddingBottom

optional padding in screen pixels to the bottom of the block.

forceUpdate

If true, the implicit update is called.